package com.example.zhongyingkaoshi.service.impl;

import com.example.zhongyingkaoshi.entity.User;
import com.example.zhongyingkaoshi.mapper.UserMapper;
import com.example.zhongyingkaoshi.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public User findByUserName(String username) {
        return userMapper.findByUserName(username);
    }

//    @Override
//    public Page<User> findUsers(String username, String email, PageRequest pageRequest) {
//        return userMapper.findUsersByConditions();
//
//    }
    @Override
    public void register(String username, String password) {
        //添加
        userMapper.add(username,password);
    }
}